
#include "nx_api.h"

#ifdef __PRODUCT_NETXDUO__

#include "netx_mdns_test.h"
/* Frame (79 bytes) */
static const unsigned char pkt1[79] = {
0x01, 0x00, 0x5e, 0x00, 0x00, 0xfb, 0x00, 0x11, /* ..^..... */
0x22, 0x33, 0x44, 0x56, 0x08, 0x00, 0x45, 0x00, /* "3DV..E. */
0x00, 0x41, 0x00, 0x07, 0x40, 0x00, 0xff, 0x11, /* .A..@... */
0xd9, 0xbe, 0xc0, 0xa8, 0x00, 0x42, 0xe0, 0x00, /* .....B.. */
0x00, 0xfb, 0x14, 0xe9, 0x14, 0xe9, 0x00, 0x2d, /* .......- */
0xc5, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, /* ........ */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x5f, /* ......._ */
0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x04, /* printer. */
0x5f, 0x74, 0x63, 0x70, 0x05, 0x6c, 0x6f, 0x63, /* _tcp.loc */
0x61, 0x6c, 0x00, 0x00, 0x0c, 0x00, 0x01        /* al..... */
};

/* Frame (497 bytes) */
static const unsigned char pkt2[497] = {
0x01, 0x00, 0x5e, 0x00, 0x00, 0xfb, 0x00, 0x1e, /* ..^..... */
0x8f, 0xb1, 0x7a, 0xd4, 0x08, 0x00, 0x45, 0x00, /* ..z...E. */
0x01, 0xe3, 0x77, 0x9c, 0x00, 0x00, 0xff, 0x11, /* ..w..... */
0xa0, 0xc5, 0xc0, 0xa8, 0x00, 0x04, 0xe0, 0x00, /* ........ */
0x00, 0xfb, 0x14, 0xe9, 0x14, 0xe9, 0x01, 0xcf, /* ........ */
0x46, 0x4d, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, /* FM...... */
0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x08, 0x5f, /* ......._ */
0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x04, /* printer. */
0x5f, 0x74, 0x63, 0x70, 0x05, 0x6c, 0x6f, 0x63, /* _tcp.loc */
0x61, 0x6c, 0x00, 0x00, 0x0c, 0x00, 0x01, 0x00, /* al...... */
0x00, 0x11, 0x94, 0x00, 0x0f, 0x0c, 0x43, 0x61, /* ......Ca */
0x6e, 0x6f, 0x6e, 0x4d, 0x46, 0x34, 0x35, 0x30, /* nonMF450 */
0x30, 0x77, 0xc0, 0x0c, 0x06, 0x72, 0x6f, 0x75, /* 0w...rou */
0x74, 0x65, 0x72, 0xc0, 0x1a, 0x00, 0x01, 0x80, /* ter..... */
0x01, 0x00, 0x00, 0x00, 0x78, 0x00, 0x04, 0xc0, /* ....x... */
0xa8, 0x00, 0x04, 0xc0, 0x2b, 0x00, 0x21, 0x80, /* ....+.!. */
0x01, 0x00, 0x00, 0x00, 0x78, 0x00, 0x08, 0x00, /* ....x... */
0x00, 0x00, 0x00, 0x02, 0x03, 0xc0, 0x3a, 0xc0, /* ......:. */
0x2b, 0x00, 0x10, 0x80, 0x01, 0x00, 0x00, 0x11, /* +....... */
0x94, 0x01, 0x56, 0x09, 0x74, 0x78, 0x74, 0x76, /* ..V.txtv */
0x65, 0x72, 0x73, 0x3d, 0x31, 0x07, 0x72, 0x70, /* ers=1.rp */
0x3d, 0x61, 0x75, 0x74, 0x6f, 0x05, 0x6e, 0x6f, /* =auto.no */
0x74, 0x65, 0x3d, 0x08, 0x71, 0x74, 0x6f, 0x74, /* te=.qtot */
0x61, 0x6c, 0x3d, 0x31, 0x0b, 0x70, 0x72, 0x69, /* al=1.pri */
0x6f, 0x72, 0x69, 0x74, 0x79, 0x3d, 0x32, 0x30, /* ority=20 */
0x11, 0x74, 0x79, 0x3d, 0x43, 0x61, 0x6e, 0x6f, /* .ty=Cano */
0x6e, 0x20, 0x4d, 0x46, 0x34, 0x35, 0x37, 0x30, /* n MF4570 */
0x64, 0x77, 0x17, 0x70, 0x72, 0x6f, 0x64, 0x75, /* dw.produ */
0x63, 0x74, 0x3d, 0x28, 0x43, 0x61, 0x6e, 0x6f, /* ct=(Cano */
0x6e, 0x20, 0x4d, 0x46, 0x34, 0x35, 0x30, 0x30, /* n MF4500 */
0x77, 0x29, 0x1c, 0x70, 0x64, 0x6c, 0x3d, 0x61, /* w).pdl=a */
0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, /* pplicati */
0x6f, 0x6e, 0x2f, 0x6f, 0x63, 0x74, 0x65, 0x74, /* on/octet */
0x2d, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2a, /* -stream* */
0x61, 0x64, 0x6d, 0x69, 0x6e, 0x75, 0x72, 0x6c, /* adminurl */
0x3d, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, /* =http:// */
0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x6c, /* router.l */
0x6f, 0x63, 0x61, 0x6c, 0x2e, 0x2f, 0x74, 0x5f, /* ocal./t_ */
0x77, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x2e, 0x63, /* welcom.c */
0x67, 0x69, 0x0d, 0x75, 0x73, 0x62, 0x5f, 0x4d, /* gi.usb_M */
0x46, 0x47, 0x3d, 0x43, 0x61, 0x6e, 0x6f, 0x6e, /* FG=Canon */
0x27, 0x75, 0x73, 0x62, 0x5f, 0x4d, 0x44, 0x4c, /* 'usb_MDL */
0x3d, 0x43, 0x61, 0x6e, 0x6f, 0x6e, 0x20, 0x4d, /* =Canon M */
0x46, 0x34, 0x35, 0x30, 0x30, 0x77, 0x20, 0x53, /* F4500w S */
0x65, 0x72, 0x69, 0x65, 0x73, 0x20, 0x28, 0x55, /* eries (U */
0x46, 0x52, 0x49, 0x49, 0x20, 0x4c, 0x54, 0x29, /* FRII LT) */
0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, /* .transpa */
0x72, 0x65, 0x6e, 0x74, 0x3d, 0x46, 0x08, 0x42, /* rent=F.B */
0x69, 0x6e, 0x61, 0x72, 0x79, 0x3d, 0x46, 0x06, /* inary=F. */
0x54, 0x42, 0x43, 0x50, 0x3d, 0x46, 0x07, 0x43, /* TBCP=F.C */
0x6f, 0x6c, 0x6f, 0x72, 0x3d, 0x46, 0x08, 0x43, /* olor=F.C */
0x6f, 0x70, 0x69, 0x65, 0x73, 0x3d, 0x54, 0x08, /* opies=T. */
0x44, 0x75, 0x70, 0x6c, 0x65, 0x78, 0x3d, 0x54, /* Duplex=T */
0x0d, 0x50, 0x61, 0x70, 0x65, 0x72, 0x43, 0x75, /* .PaperCu */
0x73, 0x74, 0x6f, 0x6d, 0x3d, 0x54, 0x06, 0x42, /* stom=T.B */
0x69, 0x6e, 0x64, 0x3d, 0x46, 0x09, 0x43, 0x6f, /* ind=F.Co */
0x6c, 0x6c, 0x61, 0x74, 0x65, 0x3d, 0x54, 0x06, /* llate=T. */
0x53, 0x6f, 0x72, 0x74, 0x3d, 0x54, 0x08, 0x53, /* Sort=T.S */
0x74, 0x61, 0x70, 0x6c, 0x65, 0x3d, 0x46, 0x07, /* taple=F. */
0x50, 0x75, 0x6e, 0x63, 0x68, 0x3d, 0x46, 0x11, /* Punch=F. */
0x50, 0x61, 0x70, 0x65, 0x72, 0x4d, 0x61, 0x78, /* PaperMax */
0x3d, 0x6c, 0x65, 0x67, 0x61, 0x6c, 0x2d, 0x41, /* =legal-A */
0x34                                            /* 4 */
};

/* Frame (144 bytes) */
static const unsigned char pkt3[144] = {
0x01, 0x00, 0x5e, 0x00, 0x00, 0xfb, 0x00, 0x11, /* ..^..... */
0x22, 0x33, 0x44, 0x56, 0x08, 0x00, 0x45, 0x00, /* "3DV..E. */
0x00, 0x82, 0x00, 0x08, 0x40, 0x00, 0xff, 0x11, /* ....@... */
0xd9, 0x7c, 0xc0, 0xa8, 0x00, 0x42, 0xe0, 0x00, /* .|...B.. */
0x00, 0xfb, 0x14, 0xe9, 0x14, 0xe9, 0x00, 0x6e, /* .......n */
0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, /* .<...... */
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x08, 0x5f, /* ......._ */
0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x04, /* printer. */
0x5f, 0x74, 0x63, 0x70, 0x05, 0x6c, 0x6f, 0x63, /* _tcp.loc */
0x61, 0x6c, 0x00, 0x00, 0x0c, 0x00, 0x01, 0x08, /* al...... */
0x5f, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, /* _printer */
0x04, 0x5f, 0x74, 0x63, 0x70, 0x05, 0x6c, 0x6f, /* ._tcp.lo */
0x63, 0x61, 0x6c, 0x00, 0x00, 0x0c, 0x00, 0x01, /* cal..... */
0x00, 0x00, 0x11, 0x93, 0x00, 0x22, 0x0c, 0x43, /* .....".C */
0x61, 0x6e, 0x6f, 0x6e, 0x4d, 0x46, 0x34, 0x35, /* anonMF45 */
0x30, 0x30, 0x77, 0x08, 0x5f, 0x70, 0x72, 0x69, /* 00w._pri */
0x6e, 0x74, 0x65, 0x72, 0x04, 0x5f, 0x74, 0x63, /* nter._tc */
0x70, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x00  /* p.local. */
};

/* Frame (144 bytes) */
static const unsigned char pkt4[144] = {
0x01, 0x00, 0x5e, 0x00, 0x00, 0xfb, 0x00, 0x11, /* ..^..... */
0x22, 0x33, 0x44, 0x56, 0x08, 0x00, 0x45, 0x00, /* "3DV..E. */
0x00, 0x82, 0x00, 0x09, 0x40, 0x00, 0xff, 0x11, /* ....@... */
0xd9, 0x7b, 0xc0, 0xa8, 0x00, 0x42, 0xe0, 0x00, /* .{...B.. */
0x00, 0xfb, 0x14, 0xe9, 0x14, 0xe9, 0x00, 0x6e, /* .......n */
0x18, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, /* .>...... */
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x08, 0x5f, /* ......._ */
0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x04, /* printer. */
0x5f, 0x74, 0x63, 0x70, 0x05, 0x6c, 0x6f, 0x63, /* _tcp.loc */
0x61, 0x6c, 0x00, 0x00, 0x0c, 0x00, 0x01, 0x08, /* al...... */
0x5f, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x65, 0x72, /* _printer */
0x04, 0x5f, 0x74, 0x63, 0x70, 0x05, 0x6c, 0x6f, /* ._tcp.lo */
0x63, 0x61, 0x6c, 0x00, 0x00, 0x0c, 0x00, 0x01, /* cal..... */
0x00, 0x00, 0x11, 0x91, 0x00, 0x22, 0x0c, 0x43, /* .....".C */
0x61, 0x6e, 0x6f, 0x6e, 0x4d, 0x46, 0x34, 0x35, /* anonMF45 */
0x30, 0x30, 0x77, 0x08, 0x5f, 0x70, 0x72, 0x69, /* 00w._pri */
0x6e, 0x74, 0x65, 0x72, 0x04, 0x5f, 0x74, 0x63, /* nter._tc */
0x70, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x00  /* p.local. */
};

static MDNS_QUERY_INFO mdns_query = {NX_NULL, "_printer._tcp", NX_NULL};

MDNS_TEST_SEQ mdns_query_printer_tcp[] = {
    {TITLE, "Query _printer._tcp", 19, 0},
    
    {MDNS_QUERY, (char*)&mdns_query, 0, 0},
    {MDNS_CHECK_DATA_V4, (char*)&pkt1[0], sizeof(pkt1), 5},
    {INJECT, (char*)&pkt2[0], sizeof(pkt2), 0},
    {MDNS_CHECK_DATA_V4, (char*)&pkt3[0], sizeof(pkt3), 5},
};

int mdns_query_printer_tcp_size = sizeof(mdns_query_printer_tcp) / sizeof(MDNS_TEST_SEQ);

#endif /* __PRODUCT_NETXDUO__  */

